Make Linux usb_set_config error point to web doc.
authorrobertl <robertl>
Wed, 25 Oct 2006 11:23:41 +0000 (11:23 +0000)
committerrobertl <robertl>
Wed, 25 Oct 2006 11:23:41 +0000 (11:23 +0000)
jeeps/gpslibusb.c

index 722635f21c89b50c9ad55fbbd4aebda3d5f7204e..225f35a474897d0f79cfc75161f699aed71c5a29 100644 (file)
@@ -209,7 +209,20 @@ garmin_usb_start(struct usb_device *dev)
         * Hrmph.  No iManufacturer or iProduct headers....
         */
        if (usb_set_configuration(udev, 1) < 0) {
+#if __linux__
+               char drvnm[128];
+               drvnm[0] = 0;
+               /*
+                * Most Linux distributions ship a slightly broken
+                * kernel driver that bonds with the hardware.  
+                */
+               usb_get_driver_np(udev, 0, drvnm, sizeof(drvnm)-1);
+               fatal("usb_set_configuration failed, probably because kernel driver '%s'\n is blocking our access to the USB device.\n" 
+               "For more information see http://www.gpsbabel.org/os/Linux_Hotplug.html\n", drvnm);
+#else
+
                fatal("usb_set_configuration failed: %s\n", usb_strerror());
+#endif
        }
 
        if (usb_claim_interface(udev, 0) < 0) {